package models

import "gorm.io/gorm"

type User struct {
	gorm.Model
	Username string `gorm:"type:varchar(30)"`
	Password string `gorm:"type:varchar(100)"`
}
type News struct {
	gorm.Model
	Title   string `gorm:"type:varchar(50)"`
	Content string `gorm:"type:varchar(255)"`
	Author  string `gorm:"type:varchar(30)"`
	Likes   int    `gorm:"type:int;default:0"`
}
type Likes struct {
	gorm.Model
	UserId int `gorm:"type:int"`
	NewsId int `gorm:"type:int"`
}
